
#pragma once
#include "coolscroll.h"

class CCoolSBCustomDraw
{
public:
	CCoolSBCustomDraw()
	{
		m_fCustomDraw = FALSE;

		m_hdcSBBar = NULL;
		m_hdcSBThumb = NULL;
		m_hdcSBButton = NULL;

		m_hBmpBar = NULL;
		m_hBmpThumb = NULL;
		m_hBmpButton = NULL;
	}
	
	~CCoolSBCustomDraw()
	{
		DeinitDC();
	}

public:
	void InitDC(HBITMAP bar_image, HBITMAP thumb_image, HBITMAP buttons_image);
	void DeinitDC();
	LRESULT HandleCustomDraw(UINT ctrlid, NMCSBCUSTOMDRAW *nm);
	void CalcDrawTables();

protected:
	BOOL m_fCustomDraw;

	HDC m_hdcSBBar;
	HDC m_hdcSBThumb;
	HDC m_hdcSBButton;

	HBITMAP m_hBmpBar;
	HBITMAP m_hBmpThumb;
	HBITMAP m_hBmpButton;
};